<!DOCTYPE html>
<html lang="en">

<head>

    <meta charset="UTF-8">

    <meta name="viewport" content="maximum-scale=1.0, minimum-scale=1.0, user-scalable=0, initial-scale=1.0, width=device-width" />

    <meta http-equiv="X-UA-Compatible" content="ie=edge">

    <link rel="stylesheet" href="../../css/api.css">

    <link rel="stylesheet" href="../../css/base_bai/base.css">


    <title>地址_展示</title>

    <style type="text/css">

    .van-nav-bar .van-icon{color:black;}

    .van-nav-bar__text{color:#333333;}

    .but_sty{text-align: center;padding-top: 70%;display:none}

    .but_sty button{width: 80%;background: #FF9900;border: 0;border-radius: 0.5rem}

    </style>

</head>

<body>
    <div id="app" v-cloak>

        <div>
            <van-nav-bar class="m-header" title="选择地址" right-text="编辑" @click-right="push_address()" left-arrow @click-left="bank()" />
        </div>

        <div>

            <van-address-list v-model="chosenAddressId" :list="list" @add="onAdd" @edit="onEdit" />
        </div>

        <div class="but_sty">
            <van-button type="primary">添加新地址</van-button>
        </div>

    </div>

</body>
<script src="../../script/api.js"></script>
<script src="../../script/base_bai/vue.js"></script>
<script src="../../script/base_bai/vant.js"></script>
<script src="../../script/base_bai/area.js"></script>
<script src="../../script/base_bai/base.js"></script>
<script src="../../script/base_bai/temp.js"></script>
<script type="text/javascript">
    apiready = function() {
        headerH = $api.fixStatusBar($api.byId('app'));

        Vue.prototype.$ac = api;

        initVue()

    };
if(BrowserType()=='pc'){
    initVue()
}

    function initVue() {
        new Vue({
            el: '#app',
            data: temp.address.address,
            methods: {

                //头部导航点击返回事件
                bank() {
                    vant.Toast('返回');
                },

                push_address() {   openWin("address_Edit_Add", "address_Edit_Add");},

                onAdd() {


                     openWin("address_Edit_Add", "address_Edit_Add");
                },

                onEdit(item, index) {
                    vant.Toast('编辑地址:' + index);
                }
            }
        });

    }
</script>

</html>
